package com.example.huajia.wx.service.impl;

import com.example.huajia.wx.db.dao.TbInfoDao;
import com.example.huajia.wx.service.InfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;

@Service
public class InfoServiceImpl implements InfoService {
    @Resource
    private TbInfoDao infoDao;

    @Override
    public ArrayList<HashMap> searchUserAddressInfo(Integer userId) {

        ArrayList<HashMap> list = infoDao.searchUserAddressInfo(userId);
        return list;

    }

    @Override
    public int insertAddressInfo(HashMap param) {
        int row = infoDao.insertAddressInfo(param);
        return row;
    }

    @Override
    public int updateAddressInfo(HashMap param) {
        int row = infoDao.updateAddressInfo(param);
        return row;
    }

    @Override
    public int deleteAddressInfo(String id) {
        int row = infoDao.deleteAddressInfo(id);
        return row;
    }
}
